/*
 *   AS IS License
 * ==Naive Coders==
 */
package org.naive.metawatch.converter.cap;

import org.naive.metawatch.converter.parser.FieldSize;
import org.naive.metawatch.converter.parser.ParsedInt;
import org.naive.metawatch.converter.parser.cap.CapParseable;

/**
 *
 * @author gbu.000
 */
public class CapStaticMemberRef extends CapParseable{

    @ParsedInt(FieldSize.BYTE)
    public byte package_token;
    @ParsedInt(FieldSize.BYTE)
    public byte class_token;
    @ParsedInt(FieldSize.BYTE)
    public byte token;

    public boolean isInternalRef() {
        return package_token == 0;
    }

    public short getInternalOffset() {
        return (short) ((0xFF & class_token) << 8 | (0xFF & token));
    }
}
